<?php

class Autoloader
{
    protected static $map = array(
        'CreditCalculator' => 'CreditCalculator/CreditCalculator.php',
    );

    public static function load($cname) {
        if (isset(self::$map[$cname])) {
            if (file_exists(self::$map[$cname])) {
                include_once(self::$map[$cname]);
            } else {
                throw new SSTException('Class file doesn\'t exists');
            }
        } else {
            throw new SSTException('Unknown classname: ' . $cname);
        }
    }
}